import request from "../utils/request";

export function login(data) {
  return request({
    method: "post",
    url: "/users/login",
    data,
  });
}

export function register(data) {
  return request({
    method: "post",
    url: "/users/register",
    data,
  });
}
export function isNameRepeat(data) {
  return request({
    method: "post",
    url: "/users/isNameRepeat",
    data,
  });
}

export function update(data) {
  return request({
    method: "post",
    url: "/users/update",
    data,
  });
}
export function getInfo(params) {
  return request({
    method: "get",
    url: "/users/info",
  });
}

export function getlist(params) {
  return request({
    method: "get",
    url: "/users/list",
    params,
  });
}
